package com.dao;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.model.Emp;
import com.model.UsersPersonal;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 个人信息表  Mapper 接口
 * </p>
 *
 * @author Damon
 * @since 2021-04-30
 */
public interface UsersPersonalDao extends BaseMapper<UsersPersonal> {
    @Select("SELECT * from users_personal")
    public Page<UsersPersonal> listPage(Page page);
    //按条件查询
    public Page<UsersPersonal> listPage(Page page,@Param("usersPersonal") UsersPersonal usersPersonal);


    @Select("SELECT a.* FROM users_personal a,users b \n" +
            "WHERE a.user_account=b.user_account AND b.type=2")
    public Page<UsersPersonal> listPageP(Page page);             //对个人的搜索
    //按条件查询
    public Page<UsersPersonal> listPageP1(Page page,@Param("usersPersonal") UsersPersonal usersPersonal);

    @Select("SELECT a.* FROM users_personal a,users b \n" +
            "WHERE a.user_account=b.user_account AND b.type=3")
    public Page<UsersPersonal> listPageE(Page page);            //对专家的搜索
    //按条件查询
    public Page<UsersPersonal> listPageE1(Page page,@Param("usersPersonal") UsersPersonal usersPersonal);
}
